#!D:\Python27
# -*- coding: utf-8 -*-
import MySQLdb
import pandas as pd
from flask import Flask,render_template,url_for
app = Flask(__name__,template_folder='/templates/',static_url_path='/static/')
@app.route('/')
def index():
    return render_template('/templates/index.html', ww='fsdjfsdf')
@app.route('/data')
def hello():
    mysql_cn= MySQLdb.connect(host='xxxxx', port=3306,user='xxx', passwd='xxx', db='xxx')
    df = pd.read_sql('select id,username from mi_user;', con=mysql_cn)
    mysql_cn.close()
    print df.head()
if __name__ == '__main__':
    app.run(debug=True,port='5000')
